Get Value of Photoelectric Sensor
Function:
magicbox.get_infrared_sensor(port)Description: get value of photoelectric sensor
Required parameter:
- port: connect photoelectric sensor to the port of Dobot Magic Box, range: 1~6
- Return:
- 0: the photoelectric sensor has not detected any object
- 1: the photoelectric sensor has detected object
Example
magicbox.get_infrared_sensor(port=1)Connect photoelectric sensor to port 1 of Dobot Magic Box. Get the value of photoelectric sensor.